package com.margo.project.dubbo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.margo.project.base.model.ExternalUser;
import com.margo.project.dubbo.service.MargoDubboConsumer;

@Controller
@RequestMapping("/dubbo/limit")
public class MargoDubboLimitController {

	@Autowired
	private MargoDubboConsumer margoDubboConsumer;
	
	/**
	 * http://localhost:8081/externalUser/get
	 * @return
	 */
	@RequestMapping("/get")
	@ResponseBody
	public ExternalUser getExternalUser() {
		return margoDubboConsumer.getExternalUser();
	}
	
	/**
	 * http://localhost:8081/externalUser/getFlow
	 * @return
	 */
	@RequestMapping("/getFlow")
	@ResponseBody
	public ExternalUser getFlowExternalUser() {
		return margoDubboConsumer.getFlowExternalUser();
	}
}
